#!/bin/sh -x

sqzPlist="/Library/Preferences/com.sorensonmedia.Squeeze 6"
#sqzPlist="/Library/Preferences/com.sorensonmedia.Squeeze Beta"
/usr/bin/defaults write "${sqzPlist}" Update 0

path=`/usr/bin/defaults read "${sqzPlist}" "Path"`
if [ "${path}" != "" ]; then
	if [ -e "${path}" ]; then
		/usr/bin/defaults write "${sqzPlist}" Update 1
		# we nuke the installation folder because
		# otherwise some things may not get copied over
		# also, it's OK to nuke old default presets
	    rm -rf "${path}" # Comment out this line for beta
	fi
fi

exit 0
